package StudyCode.summary.Basic;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class GCD {
	public static void main(String[] arg) {
		int a = 38;
		int b = 24;
		System.out.println("计算最大公约数(" + a + "," + b + ")");

		while (a != b) {
			if (a > b) a = a - b;
			else b = b - a;
		}//from w  w w  . j a v  a  2  s .  c o  m
		// Display to console
		System.out.println("最大公约数是： " + a);
	}
}
